package com.zhouyang.bootssh;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @Auther: 周洋
 * @Date: 2018/11/14 15:17
 * @Description:
 */
@SpringBootApplication
@EntityScan("com.zhouyang.bootssh.entity.books")//扫描实体类
@ComponentScan(basePackages = "com.zhouyang.bootssh.api.books")//扫描接口api
@ComponentScan(basePackages = "com.zhouyang.bootssh")//扫描根包下面所有的类
@EnableSwagger2//集成 开启接口文档自动生成
@MapperScan("com.zhouyang.bootssh.dao")  //扫描mapper接口
public class BooksApplication {

    public static void main(String[] args) {
        SpringApplication.run(BooksApplication.class);
    }
}
